package com.lfnyxy.eenum;

import com.lfnyxy.common.cnst.AppString;

/**
 * Created by ted on 17/9/11.
 * 操作结果通用类。定义所有可能出现的异常结果。
 */
public enum SubjectRef {
    DEV_PAY(1, "研发支出"),
    PRO_PAY(2, "项目支出"),
    FEE_PAY(3, "费用支出"),

    UNKNOW(-999, AppString.UnKnow);

    SubjectRef(int code, String content) {
        this.code = code;
        this.content = content;
    }

    private int code;
    private String content;

    public int getCode() {
        return code;
    }

    public String getContent() {
        return content;
    }

    public static SubjectRef valueOf(int code){
        for(SubjectRef item: values()){
            if(item.getCode() == code){
                return item;
            }
        }
        return UNKNOW;
    }
}
